package com.dxiang.demo.web.controller;

import com.dxiang.demo.mapper.TagsMapper;
import com.dxiang.demo.model.Tags;
import com.dxiang.demo.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
public class TagController extends BaseController{

    @Autowired
    private TagService tagService;

    /**
     * 获取全部标签列表
     * @return
     */
    @RequestMapping("/getTags")
    public ResponseEntity<?> getTags(){
        return success(tagService.getTags());
    }

    /**
     * 获取标签分类列表
     * @return
     */
    @RequestMapping("/getTagsClassification")
    public ResponseEntity<?> getClassification(){
        return success(tagService.getTagsClassification());
    }
}
